﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BusinessLogic.Data
{
    public class Comment
    {
        #region CTOR 
        public Comment()
        {
        }

        public Comment(DataRow row)
        {
            Load(row);
        }
        #endregion CTOR

        public int ID { get; set; }
        
        public int UserID { get; set; }
        
        public string UserName { get; set; }
        
        public string Content { get; set; }
        
        public DateTime CreationDate { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="row"></param>
        public void Load(DataRow row)
        {
            ID = row.Field<int>("ID");
            UserID = row.Field<int>("UserID");
            UserName = row.Field<string>("UserName");
            Content = row.Field<string>("Content");
            CreationDate = row.Field<DateTime>("CreationDate");
        }
    }
}
